package anthology.daily_question._25_01;
//https://leetcode.cn/problems/find-the-key-of-the-numbers/description/?envType=daily-question&envId=2025-01-10
public class _3270求出数字答案 {
    class Solution {
        public int generateKey(int num1, int num2, int num3) {
            int key = 0;
            for (int p = 1; num1 > 0 && num2 > 0 && num3 > 0; p *= 10) {
                key += Math.min(Math.min(num1 % 10, num2 % 10), num3 % 10) * p;
                num1 /= 10;
                num2 /= 10;
                num3 /= 10;
            }
            return key;
        }
    }
}
